package com.hhw.controller;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.hhw.entity.Books;
import com.hhw.service.BooksService;

/**
 * Servlet implementation class BooksAddServlet
 */
@WebServlet("/BooksAddServlet")
public class BooksAddServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public BooksAddServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	
		
		request.getRequestDispatcher("/WEB-INF/jsp/AddBooks.jsp").forward(request, response);
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//		String Book_id =request.getParameter("Book_id");
//		String Book_name =request.getParameter("Book_name");
//		String Writer =request.getParameter("Writer");
//		String Press =request.getParameter("Press");
//		String Classification =request.getParameter("Classification");
//		String Price =request.getParameter("Price");
//		String Isbn =request.getParameter("Isbn");
//		String Total =request.getParameter("Total");
//		String Borrow_count =request.getParameter("Borrow_count");
//		Books bd=new Books();
//		bd.setBook_id(0);
//		bd.setBook_name(Book_name);
//		bd.setWriter(Writer);
//		bd.setPress(Press);
//		bd.setClassification(Classification);
//		bd.setIsbn(Isbn);
//		bd.setBorrow_count(Borrow_count);
//		  request.getRequestDispatcher("/WEB-INF/jsp/AddBooks.jsp").forward(request, response);
//	}
	}
}
